const state = {
  token: ''
}

const getters = {
  token: state => state.user.token
}

const actions = {
  getToken ({commit}, token) {
    commit('setToken', token)
  }
}

const mutations = {
  setToken (state, token) {
    state.token = token
  }
}

export default {
  state,
  getters,
  actions,
  mutations
}
